package com.bwda.dsrs.filecenter.util;

import com.bwda.dsrs.base.centerbase.response.ResponseEntity;
import com.bwda.dsrs.filecenter.api.OrgServiceApi;
import com.bwda.dsrs.filecenter.domain.BusinessConstants;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: yz
 * @create: 2019-04-28 11:15
 */
@Component
public class UploadUtils {

    @Autowired
    private OrgServiceApi orgServiceApi;



    /**
     * 是否需要加密
     * 0:不加密
     *
     * @return
     */
    public boolean needEnc() {
        String val = orgServiceApi.getDictValByCode("isEncryption");
        return !BusinessConstants.IS_ENCRYPTION.equals(val);
    }

}